package com.hainatong.jcmvvmbase.mainhome.fragment.warehouse;

import android.os.Bundle;
import android.view.View;
import com.hainatong.jcmvvmbase.Constants;
import com.hainatong.jcmvvmbase.MvvmLazyFragment;
import com.hainatong.jcmvvmbase.R;
import com.hainatong.jcmvvmbase.databinding.FragmentRukuAddListBinding;
import com.hainatong.jcmvvmbase.mainhome.ComFragmentActivity;
import com.hainatong.mvvmbase.base.NoViewModel;

public class ChukuAddFragment extends MvvmLazyFragment<FragmentRukuAddListBinding, NoViewModel>
{

    private static String CHUKU_ADD_TAG = "ChukuAddFragment";

    private String goodsCode ;

    public static ChukuAddFragment newInstance(String scanCode)
    {
        Bundle bundle = new Bundle();
        bundle.putString( CHUKU_ADD_TAG , scanCode );
        ChukuAddFragment addFragment = new ChukuAddFragment();
        addFragment.setArguments( bundle );
        return addFragment;
    }

    @Override
    public int getLayoutId()
    {
        return R.layout.fragment_ruku_add_list;
    }

    @Override
    public int getBindingVariable()
    {
        return 0;
    }

    @Override
    protected void initView(View view)
    {
        Bundle args = getArguments();
        if(  args != null )
        {
            goodsCode = args.getString(CHUKU_ADD_TAG , "");
        }


        viewDataBinding.tvOk.setOnClickListener( v -> {

            Bundle bundle = new Bundle();
            bundle.putString( Constants.FRAGMNET_TYPE, Constants.VIEW_TYPE_LINGYONG_INFO);
            ComFragmentActivity.start( getActivity(),bundle );

        } );
    }

    @Override
    protected void onRetryBtnClick()
    {
    }



}
